load("//bazel:skia_rules.bzl", "skia_cc_binary")

package(
    default_applicable_licenses = ["//:license"],
)

licenses(["notice"])

skia_cc_binary(
    name = "viewer",
    testonly = True,
    srcs = [
        "AnimBlurSlide.cpp",
        "AnimTimer.h",
        "AnimatedImageSlide.cpp",
        "AnimatedImageSlide.h",
        "AnimatedRectsSlide.cpp",
        "AnimatedTextSlide.cpp",
        "ArcSlide.cpp",
        "BisectSlide.cpp",
        "BisectSlide.h",
        "CameraSlide.cpp",
        "ChartSlide.cpp",
        "ChineseFlingSlide.cpp",
        "ClickHandlerSlide.cpp",
        "ClickHandlerSlide.h",
        "ClipSlide.cpp",
        "ClockSlide.cpp",
        "CowboySlide.cpp",
        "DegenerateQuadsSlide.cpp",
        "DegenerateTwoPtRadialsSlide.cpp",
        "FatBitsSlide.cpp",
        "FilterBoundsSlide.cpp",
        "FitCubicToCircleSlide.cpp",
        "FlutterAnimateSlide.cpp",
        "GMSlide.cpp",
        "GMSlide.h",
        "GlyphTransformSlide.cpp",
        "GradientsSlide.cpp",
        "GraphitePrimitivesSlide.cpp",
        "ImGuiLayer.cpp",
        "ImGuiLayer.h",
        "ImageFilterDAGSlide.cpp",
        "ImageSlide.cpp",
        "ImageSlide.h",
        "LayersSlide.cpp",
        "MSKPSlide.cpp",
        "MSKPSlide.h",
        "ManyRectsSlide.cpp",
        "MaterialShadowsSlide.cpp",
        "MegaStrokeSlide.cpp",
        "MeshGradientSlide.cpp",
        "MeshSlide.cpp",
        "MixerSlide.cpp",
        "PathClipSlide.cpp",
        "PathEffectsSlide.cpp",
        "PathLerpSlide.cpp",
        "PathOverstrokeSlide.cpp",
        "PathSlide.cpp",
        "PathTessellatorsSlide.cpp",
        "PathTextSlide.cpp",
        "ProtectedSlide.cpp",
        "QuadStrokerSlide.cpp",
        "RectanizerSlide.cpp",
        "RepeatTileSlide.cpp",
        "SBIXSlide.cpp",
        "SGSlide.cpp",
        "SKPSlide.cpp",
        "SKPSlide.h",
        "SVGFileSlide.cpp",
        "ShadowColorSlide.cpp",
        "ShadowReferenceSlide.cpp",
        "ShadowUtilsSlide.cpp",
        "ShipSlide.cpp",
        "SimpleStrokerSlide.cpp",
        "SkSLDebuggerSlide.cpp",
        "SkSLDebuggerSlide.h",
        "SkSLSlide.cpp",
        "SkSLSlide.h",
        "SkottieSlide.cpp",
        "SkottieSlide.h",
        "Slide.h",
        "SlideDir.cpp",
        "SlideDir.h",
        "StatsLayer.cpp",
        "StatsLayer.h",
        "StringArtSlide.cpp",
        "StrokeVerbSlide.cpp",
        "SvgSlide.cpp",
        "SvgSlide.h",
        "TextureUploadSlide.cpp",
        "ThinAASlide.cpp",
        "TimingSlide.cpp",
        "TouchGesture.cpp",
        "TouchGesture.h",
        "TypefaceSlide.cpp",
        "VariableWidthStrokerSlide.cpp",
        "Viewer.cpp",
        "Viewer.h",
        "//bench:gpu_tools",
        "//gm:gm_subset",
        "//tools/fonts:test_font_manager_srcs",
    ],
    data = [
        "//resources",
    ],
    deps = [
        "//:core",
        "//:fontmgr_directory_freetype",
        "//:fontmgr_empty_fontations",
        "//:skshaper_core",
        "//:svg_renderer",
        "//gm",
        "//modules/audioplayer",
        "//modules/skottie",
        "//modules/skottie/utils:skottie_utils",
        "//modules/skottie/utils:text_editor",
        "//modules/skresources",
        "//modules/sksg",
        "//src/sksl/tracing:player",
        "//tools:codec_utils",
        "//tools:gpu_tool_utils",
        "//tools:mskp_player",
        "//tools:registry",
        "//tools:runtime_blend_utils",
        "//tools/flags:common_flags",
        "//tools/flags:ganesh_flags",
        "//tools/flags:graphite_flags",
        "//tools/gpu:ganesh_gl_utils",
        "//tools/graphite:graphite_utils",
        "//tools/sk_app",
        "//tools/sksltrace:sksltraceutils",
        "//tools/skui",
        "//tools/timer",
        "//tools/trace",
        "//tools/window:window_graphite",
        "@delaunator",
        "@imgui",
    ] + select({
        "@platforms//os:linux": ["@spirv_tools"],
        "//conditions:default": [],
    }),
)
